package com.sebiotec.ambassador.net;



import com.sebiotec.ambassador.model.SearchEntrty;
import com.sebiotec.ambassador.model.response.AddNocationResponse;
import com.sebiotec.ambassador.model.response.JobDetailResponse;
import com.sebiotec.ambassador.model.response.MessListResponse;
import com.sebiotec.ambassador.model.response.MessageDetailResponse;
import com.sebiotec.ambassador.model.response.SiginResponse;
import com.sebiotec.ambassador.model.response.UseProfileResponse;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.HeaderMap;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Path;

public interface BookAPi {



    //获取首页数据
    @GET("/api/Booking/Dashboard")
    Observable<String> getDashboard(@HeaderMap Map<String, Object> headers);




    //分类数据

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @POST("/SearchBookings")
    Observable<String> getSearchBookings(@HeaderMap Map<String, Object> headers, @Body RequestBody body);


    //地点 Locations
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @POST("/SearchLocations")
    Observable<String> getLocations(@HeaderMap Map<String, Object> headers, @Body RequestBody body);


    //地点 Charged Type

    @GET("/api/ChargedTypes")
    Observable<String> getChargedType(@HeaderMap Map<String, Object> headers);

    @GET("/api/Bookers")
    Observable<List<AddNocationResponse>> getAddNotication(@HeaderMap Map<String, Object> headers);
    //地点 Charged Type

    @GET("/api/VehicleTypes")
    Observable<String> getVehicleType(@HeaderMap Map<String, Object> headers);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @POST("/api/Bookings ")
    Observable<ResponseBody> ADDBookings(@HeaderMap Map<String, Object> headers, @Body RequestBody body);


    @Headers({"Content-Type: application/json","Accept: application/json"})
    @POST("/api/Ambassadors/SearchJobHistory")
    Observable<SearchEntrty> getHistoryBookings(@HeaderMap Map<String, Object> headers, @Body RequestBody body);



    @GET("/api/Users/{LoginId}")
    Observable<UseProfileResponse> getUser(@HeaderMap Map<String, Object> headers, @Path("LoginId") String LoginId);



    @Headers({"Content-Type: application/json","Accept: application/json"})
    @POST("/api/Users/{LoginId}")
    Observable<ResponseBody> EditTextUser(@HeaderMap Map<String, Object> headers, @Path("LoginId") String LoginId, @Body RequestBody body);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @POST("/api/Users/Password/{LoginId}")
    Observable<ResponseBody> EditPwd(@HeaderMap Map<String, Object> headers, @Path("LoginId") String LoginId, @Body RequestBody body);


    @Headers({"Content-Type: application/json","Accept: application/json"})
    @POST("/api/SearchMessage")
    Observable<MessListResponse> MessageList(@HeaderMap Map<String, Object> headers, @Body RequestBody body);



    //已读https://localhost:5330/api/Messages/{Id}
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @POST("/api/Messages/{Id}")
    Observable<ResponseBody> isRead(@HeaderMap Map<String, Object> headers, @Path("Id") String Id, @Body RequestBody body);




    @GET("/api/Messages/{BookingId}")
    Observable<MessageDetailResponse> getMessageDetail(@HeaderMap Map<String, Object> headers, @Path("BookingId") String BookingId);

    //获取job


    @Headers({"Content-Type: application/json","Accept: application/json"})
    @POST("/api/SearchAmbassJobs")
    Observable<String> getJob(@HeaderMap Map<String, Object> headers, @Body RequestBody body);

    //已读https://localhost:5330/api/Messages/{Id}
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @POST("/api/Ambassadors/JobRead/{BookinId}")
    Observable<ResponseBody> JobisRead(@HeaderMap Map<String, Object> headers, @Path("BookinId") String BookinId, @Body RequestBody body);


    //查看

    @GET("/api/Ambassadors/{BookingId}")
    Observable<JobDetailResponse> getJobDetail(@HeaderMap Map<String, Object> headers, @Path("BookingId") String BookingId);



    @GET("/api/Ambassadors/Signboard/{Bookingid}")
    Observable<SiginResponse> getJobSign(@HeaderMap Map<String, Object> headers, @Path("Bookingid") String Bookingid);


    //修改job

    //修改job状态


    @Headers({"Content-Type: application/json","Accept: application/json"})
    @POST("/api/Ambassadors/{BookingId} ")
    Observable<ResponseBody> UpdateJob(@HeaderMap Map<String, Object> headers, @Path("BookingId") String BookingId, @Body RequestBody body);





}
